mgmt: Add support for optional custom domain header on whitelisted endpoints#943
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #943 +/- ##
===========================================
+ Coverage 34.72% 80.11% +45.39%
===========================================
Files 462 462
Lines 5979 6025 +46
Branches 283 291 +8
===========================================
+ Hits 2076 4827 +2751
+ Misses 3848 1105 -2743
- Partials 55 93 +38
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ad8580e to
43d66ab
Compare
kishore7snehil
requested changes
Mar 24, 2026
|
@kailash-b We can add a section in Readme about how to use this header. |
9c088cf to
2aa4aa0
Compare
Contributor
Author
Updated the Examples section. |
kishore7snehil
requested changes
Mar 24, 2026
Merged
This was referenced May 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
This PR adds support for an optional
Auth0-Custom-DomainHTTP header on whitelisted Management API endpoints.CustomDomainHeaderstatic class exposing theAuth0-Custom-Domainheader name constantManagementApiClientconstructors accepting an optionalcustomDomainparameter:ManagementApiClient(string token, Uri baseUri, IManagementConnection managementConnection, string? customDomain)ManagementApiClient(string token, string domain, IManagementConnection connection, string? customDomain)HttpClientManagementConnectionconstructor accepting an optionalcustomDomainparametercustomDomainis provided, theAuth0-Custom-Domainheader is automatically included on requests to the following whitelisted endpoints only:POST /api/v2/jobs/verification-emailPOST /api/v2/tickets/email-verificationPOST /api/v2/tickets/password-changePOST /api/v2/organizations/{id}/invitationsGET/POST /api/v2/usersGET /api/v2/users/{id}POST /api/v2/guardian/enrollments/ticketPOST /api/v2/self-service-profiles/{id}/sso-ticketAssemblyInfo.csupdated to expose internals toAuth0.Core.UnitTestsfor testabilityUsage example:
References
Testing
This change adds unit test coverage
This change adds integration test coverage
This change has been tested on the latest version of the platform/language or why not
Checklist
I have read the Auth0 general contribution guidelines
I have read the Auth0 Code of Conduct
All existing and new tests complete without errors